package com.suo.mapper;

import com.suo.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {

    /**
     * 根据账户密码查询用户信息
     * @param name
     * @param password
     * @return
     */
    User select(@Param("name") String name, @Param("password") String password);

    @Select("select * from t_user where name = #{name}")
    User selectByName(String name);

    void add(@Param("name") String name, @Param("password") String password,@Param("email") String email);

    void add(User user);
}
